﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Logic
{
    public class GadgetResponse<T>
    {
        public String RedirectUrl;
        public T Data;
        public String ErrorMessage;
        public GadgetResponseStatus Status;
        public Boolean NoEncoding = false;

        public GadgetResponse()
        {

        }

        public GadgetResponse(T data)
        {
            this.Data = data;
            this.Status = GadgetResponseStatus.Success;
        }

        public GadgetResponse(String redirect)
        {
            this.RedirectUrl = redirect;
            this.Status = GadgetResponseStatus.Success;
            this.ErrorMessage = "User does not exist";
        }
    }

    public enum GadgetResponseStatus
    {
        Success,
        ID_Missing,
        Signitue_Error,
        Error,
        Oauth_Connection_Error,
        Not_Logged_In
    }
}
